package com.bookyourtrek.action;

import java.math.BigInteger;

import com.bookyourtrek.model.TrekModel;
import com.bookyourtrek.util.RuntimeSettings;
import com.opensymphony.xwork2.ActionSupport;

public class ManageAdventureAction extends ActionSupport{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private BigInteger adventureid;
	private Integer adventuretype;
	
	public BigInteger getAdventureid() {
		return adventureid;
	}
	public void setAdventureid(BigInteger adventureid) {
		this.adventureid = adventureid;
	}
	public Integer getAdventuretype() {
		return adventuretype;
	}
	public void setAdventuretype(Integer adventuretype) {
		this.adventuretype = adventuretype;
	}

public String activateadventure() {
		
		//if trekking
		if (adventuretype == RuntimeSettings.EVENTTREKKING) {
			TrekModel tm = new TrekModel();
			tm.maketrekactive(adventureid);
		}
		
		return SUCCESS;
	}

public String canceladventure() {
			//if trekking
			if (adventuretype == RuntimeSettings.EVENTTREKKING) {
				TrekModel tm = new TrekModel();
				tm.canceltrek(adventureid);
			}
			
			return SUCCESS;
}

}
